package com.pzhu.acargid.paper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pzhu.acargid.domain.Paper;
import com.pzhu.acargid.until.Filters;
import com.pzhu.acargid.vo.PaperVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Lenovo
 * @description 针对表【paper】的数据库操作Mapper
 * @createDate 2023-08-13 15:48:26
 * @Entity generator.domain.Paper
 */
@Mapper
public interface PaperMapper extends BaseMapper<Paper> {
    @Select("SELECT * FROM doc  LEFT JOIN paper ON id=doc_id WHERE removed=0 and user_id=#{userid} and mod_db_table=#{model}  order by   ${type} ${order}")
    Page<PaperVO> getPaperPage(@Param("userid") Integer userid, @Param("iPage") IPage<Paper> iPage, @Param("docStatus") Integer docStatus, @Param("model") String model, @Param("type") String type, @Param("order") String order);

    List<PaperVO> filter(@Param("userid") Integer userid, @Param("type") String type, @Param("filter") Filters filters);
}




